<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn" lang="zh-cn">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>用户注册</title>
</head>
<body>
<div style="color: red"><?php echo $t; ?></div>
<form action="<?php echo $action_url; ?>" method="post">
<table>
	<tr>
		<td align="right">
			<span>登录名：</span>
		</td>
		<td>
			<input type="text" name="user_loginname" size="50" value="<?php if (isset($user['user_loginname'])) echo $user['user_loginname'];?>" />
			<div style="color: red"><?php if (isset($errors['user_loginname'])) echo $errors['user_loginname'];?></div>
		</td>
	</tr>
	<tr>
		<td align="right">
			<span>登录密码：</span>
		</td>
		<td>
			<input type="text" name="user_password" id="user_password" size="50" value="<?php if (isset($user['user_password'])) echo $user['user_password'];?>" />
			<div style="color: red"><?php if (isset($errors['user_password'])) echo $errors['user_password'];?></div>
		</td>
	</tr>
	<tr>
		<td align="right">
			<span>再次输入密码：</span>
		</td>
		<td>
			<input type="text" name="user_repassword" size="50" value="<?php if (isset($user['user_repassword'])) echo $user['user_repassword'];?>" />
			<div style="color: red"><?php if (isset($errors['user_repassword'])) echo $errors['user_repassword'];?></div>
		</td>
	</tr>
	<tr>
		<td align="right">
			<span>所属管理组：</span>
		</td>
		<td> 
			<select name="group_id" class="inputbox" size="1">
				<?php foreach ($groups as $group) { ?>
				<option value="<?php echo $group['group_id'];?>" <?php if (isset($user['group_id']) && ($group['group_id'] == $user['group_id'])) echo 'selected'; ?>><?php echo $group['group_name'];?></option>
				<?php } ?>
			</select>
		</td> 
	</tr>
	<tr>
		<td align="right">
			<span>用户邮箱：</span>
		</td>
		<td>
			<input type="text" name="user_email" size="50" value="<?php if (isset($user['user_email'])) echo $user['user_email'];?>" />
			<div style="color: red"><?php if (isset($errors['user_email'])) echo $errors['user_email'];?></div>
		</td>
	</tr>
	<tr>
		<td align="right">
			<span>用户昵称：</span>
		</td>
		<td>
			<input type="text" name="user_nicename" size="50" value="<?php if (isset($user['user_nicename'])) echo $user['user_nicename'];?>" />
		</td>
	</tr>
	<tr>
		<td align="right" >
			<input type="hidden" name="do" value="add" /> 
			<input type="submit" value="注册" />
		</td>
	</tr>
</table>
</form>
</body>
</html>
